<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>搜索测试后台-查准率信息明细</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/css/style.css">
	<script type="text/javascript" src="${request.contextPath}/js/jquery-1.6.1.min.js"></script>
	<script type="text/javascript" src="${request.contextPath}/js/main.js"></script>
	
	<script type="text/javascript">
	$(function(){
		$('li[class$="bgcolor_1"]').css('background-color', '#98F3B6');
		$('li[class$="bgcolor_2"]').css('background-color', '#FFACAC');
		
		$('tr.titleTr').bind('click', function() {
		
			var ctnDiv = $(this).next('tr.ctnTr').find('div.indiv');
			var data = ctnDiv.data('v');
			if(data && data == 1){
				ctnDiv.stop(true, true).slideUp(500);
				ctnDiv.data('v', 0);
			}else{
				ctnDiv.stop(true, true).slideDown(1100);
				ctnDiv.data('v', 1);
			}
		});
	});
	
	</script>
	<style type="text/css">
		#mtbl tr{
		}
		.tdTitle{
			background-color:#555555;
			color:white;
			font-weight:bold;
			font-size:14px;
			height:30px;
		}
		.indiv{
			display:none;
		}
		tr.titleTr{
			cursor:pointer;
			background-color:#108AC6;
			color:white;
		}
		.floatLi{
			height:198px;
			margin-left:10px;
		}
		#mtbl td{
			border:none;
		}
	</style>
  </head>
  
  <body>
  	
	<div class="mainDiv">
  		<#if weight?exists && (weight.beans?size>0) >
  			<div style="text-align:center;font-size:22px;padding-top:10px;font-weight:bold;color:red;">
  				${weight.key}
  			</div>
	  		<div style="color:#bbbbbb;font-size:11px;margin-bottom:5px;">
	  			查准率计算的明细数据（实时）
	  		</div>
  			<div>
  				<table id="mtbl" style="width:1000px;margin:15px auto;border-collapse:collapse;">	
  					<tr>
						<td class="tdTitle">页码（n）</td>
						<td class="tdTitle">正确（r）</td>
						<td class="tdTitle">错误（w）</td>
						<td class="tdTitle">权重（R）</td>
					</tr>
					<#list weight.beans as bean>
					<tr class="titleTr">
						<td>${bean.page}</td>
						<td>${bean.right}</td>
						<td>${bean.wrong}</td>
						<td>${bean.weight}</td>
					</tr>
					<tr class="ctnTr">
						<td colspan="4">
							<div class="indiv" style="height:auto;padding-bottom:5px;">
								<#if bean?exists && (bean.goods?size>0) >
									<#list bean.goods as g>
									<li class="floatLi bgcolor_${g.status}">
									 	<img src="http://img2.mbanggo.com/${g.img}" width="120" height="120" />
									 	<div style="width:150px;margin-top:3px;overflow:hidden;text-align:left;">
											${g.goodsTitle}
										</div>
									 	<div style="width:150px;height:45px;margin-top:10px;overflow:hidden;">
											${g.goodsSn}&nbsp;${g.cateNames}
										</div>
								 	</li>
									</#list>
								</#if>
							</div>
						</td>
					</tr>
					</#list>
  				</table>
  			</div>
	  		<#else>
	  		没有数据
  		</#if>
  			
  			
  		<div style="margin-top:11px;color:#222222;font-size:11px;">
  			<div style="text-align:left;padding-left:40px;">计算公式：</div>
  			f(n) = [ r<sub>n</sub> / (r<sub>n</sub> + w<sub>n</sub>) ] * R<sub>n</sub> ;<br />
  			<table border="0" style="border:none;border-collapse:collapse;width:250px;margin:auto;">
  				<tr>
  					<td style="border:none;">查准率 = </td>
  					<td style="border:none;">
  						<div style="border-bottom:1px solid #000000;">
  							[ f(1) + f(2) + ... + f(n) ]
  						</div>
  						(R<sub>1</sub> + R<sub>2</sub> + ... + R<sub>n</sub>)
  					</td>
  				</tr>
  			</table>
  		</div>
  	</div>
  </body>
</html>
